package com.hangxintong.common.feign;

import com.hangxintong.common.base.dto.MessageDTO;
import com.hangxintong.common.base.dto.MessageFiles;
import com.hangxintong.common.config.FeignConfiguration;
import com.hangxintong.common.utils.Result;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 消息模块
 * mxf
 */
@FeignClient(value = "hxt-message", configuration = FeignConfiguration.class)
public interface MessageFegin {
    /**
     * 催缴会费通知
     *
     * @param sjr_id
     * @param text
     * @param title
     * @return
     * @author mxf 2020-12-28
     */
    @PostMapping(value = "/message/webStation")
    Result duesCallNotice(@RequestParam(value = "id", defaultValue = "", required = false) @ApiParam(name = "id", value = "消息id", example = "请传入消息id") String id,
                          @RequestParam(value = "title", defaultValue = "", required = false) @ApiParam(name = "title", value = "消息标题") String title,
                          @RequestParam(value = "text", defaultValue = "", required = false) @ApiParam(name = "text", value = "消息内容") String text,
                          @RequestParam(value = "sjr_id", defaultValue = "", required = false) @ApiParam(name = "sjr_id", value = "收件人ID") Integer sjr_id);

    /**
     * 添加消息
     * @param messageDTO
     * @return
     */
    @PostMapping(value="/message/webStation/saveMessage")
    Result saveMessage(@RequestBody @Validated MessageDTO messageDTO);
}
